//
//  CourseingModel.swift
//  约健
//
//  Created by tyh on 2017/10/10.
//  Copyright © 2017年 tyh. All rights reserved.
//

/*
"id":"3",
"name":"线下训练（入门）",
"thumb":"train/thumb/20161202/thumb_20161202103554_1934088441.jpg",
"thumbsize":"111K",
"degree":"1",
"intro":"线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）",
"notice":"<p>线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）</p>",
"bmnotice":"线下训练（入门）线下训练（入门）线下训练（入门）线下训练（入门）",
"traintime":"2017-1-20",
"place":"大连",
"price":"120",
"tel":"22222",
"userid":"1",
"hits":"128",
"insert_time":null,
"update_time":"2016-12-02 10:35:54",
"check_userid":"1",
"checktime":null,
"checkstate":"1",
"listorder":"1",
"vstate":"1"
*/
import UIKit


class CourseingModel: NSObject {
    
    var id:NSString!
    var name:NSString!
    var thumb:NSString!
    var thumbsize:NSString!
    var degree:NSString!
    var intro:NSString!
    var notice:NSString!
    var bmnotic:NSString!
    var traintime:NSString!
    var place:NSString!
    var price:NSString!
    var tel:NSString!
    var userid:NSString!
    var hits:NSString!
    var insert_time:NSNull!
    var update_time:NSString!
    var check_userid:NSString!
    var checktime:NSNull!
    var checkstate:NSString!
    var listorder:NSString!
    var vstate:NSString!
    
    class func CourseingModelWithDict(_ dict:NSDictionary)-> CourseingModel{
        let model = CourseingModel()
        
       // model.setValuesForKeys(dict as! [String: NSObject])
        
        model.id = dict.value(forKey: "id") as! NSString!
        model.name = dict.value(forKey: "name") as! NSString!
        model.thumb = dict.value(forKey: "thumb") as! NSString!
        model.thumbsize = dict.value(forKey: "thumbsize") as! NSString!
        model.intro = dict.value(forKey: "intro") as! NSString!
        model.notice = dict.value(forKey: "notice") as! NSString!
        model.bmnotic = dict.value(forKey: "bmnotic") as! NSString!
        model.hits = dict.value(forKey: "hits") as! NSString!
        model.traintime = dict.value(forKey: "traintime") as! NSString!
        model.degree = dict.value(forKey: "degree") as! NSString!
        model.userid = dict.value(forKey: "userid") as! NSString!
        model.insert_time = dict.value(forKey: "insert_time") as! NSNull!
        model.update_time = dict.value(forKey: "update_time") as! NSString!
        model.check_userid = dict.value(forKey: "check_userid") as! NSString!
        model.checktime = dict.value(forKey: "checktime") as! NSNull!
        model.checkstate = dict.value(forKey: "checkstate") as! NSString!
        model.listorder = dict.value(forKey: "listorder") as! NSString!
        model.vstate = dict.value(forKey: "vstate") as! NSString!
        model.place = dict.value(forKey: "place") as! NSString!
        model.price = dict.value(forKey: "price") as! NSString!
        model.tel = dict.value(forKey: "tel") as! NSString!
        
        
        return model
    }
    


}
